<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<HTML>
	<HEAD>
		<meta http-equiv="Content-Language" content="zh-cn">
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<link href="${pageContext.request.contextPath}/css/Style1.css" rel="stylesheet" type="text/css" />
		<link rel="stylesheet" href="css/bootstrap.min.css" />
	</HEAD>
	<body>
		
		<div class="container">
	    <div class="row">
	        <div class="col-md-12">
	            <div class="page-header">
	                <h1>岗位管理</h1>
	            </div>
	            <ul class="nav nav-tabs">
	                <li class="active">
	                    <a>岗位列表</a>
	                </li>
	                <li>
	                    <a href="" role="button" data-toggle="modal" data-target="#myModal">添加岗位</a>
	                </li>
	            </ul>
	            <table class="table">
	                <thead>
	                    <tr>
	                        <th>岗位名称</th>
	                        <th>操作</th>
	                    </tr>
	                </thead>
	                <tbody>
	                	<c:forEach var="post" items="${ list }" >
	                    <tr>
	                        <td>${ post.post_name }</td>
	                        <td>
	                            <div role="presentation" class="dropdown">
	                                <button class="btn btn-default dropdown-toggle" data-toggle="dropdown" href="#" role="button" aria-haspopup="true" aria-expanded="false">
	                                    操作<span class="caret"></span>
	                                </button>
	                                <ul class="dropdown-menu">
	                                   <li><a href="${ pageContext.request.contextPath }/PostManagerServlet?method=queryPost&post_id=${ post.post_id}">编辑</a></li>
	                                   <li><a href="${ pageContext.request.contextPath }/PostManagerServlet?method=deletePost&post_id=${ post.post_id}">删除</a></li>
	                                </ul>
	                            </div>
	                        </td>
	                    </tr>
	                    </c:forEach>
	                </tbody>
	            </table>
	            <!-- <nav class="pull-right">
	                <ul class="pagination">
	                    <li class="disabled"><a href="#" aria-label="Previous"><span aria-hidden="true">&laquo;</span></a></li>
	                    <li class="active"><a href="#">1</a></li>
	                    <li><a href="#">2 </a></li>
	                    <li><a href="#">3 </a></li>
	                    <li><a href="#">4 </a></li>
	                    <li><a href="#">5 </a></li>
	                    <li><a href="#">6 </a></li>
	                    <li><a href="#" aria-label="Next"><span aria-hidden="true">&raquo;</span></a></li>
	                </ul>
	            </nav> -->
	        </div>
	    </div>
	</div>
	
	<!-- Modal -->
	<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
	  <div class="modal-dialog" role="document">
	    <div class="modal-content">
	      <div class="modal-header">
	        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
	        <h4 class="modal-title" id="myModalLabel">添加岗位</h4>
	      </div>
	      <div class="modal-body">
	      	<form id="deptmanagerAction_save_do" name="Form1" action="${pageContext.request.contextPath}/PostManagerServlet?method=savePost" method="post">
                    <div class="form-group">
                        <label for="post_name">岗位名称</label>
                        <input type="text" id="post_name" name="post_name" class="form-control" placeholder="岗位名称">
                    </div>
	      </div>
	      <div class="modal-footer">
	        <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
	        <button type="submit" class="btn btn-primary">保存</button>
	      </div>
                </form>
	    </div>
	  </div>
	</div>
	
	<script src="js/jquery-1.11.3.min.js"></script>
	<script src="js/bootstrap.min.js"></script>
	<script type="text/javascript">
		//JavaScript 初始化
		
		$(function(){
						
		});
		
		
		
	</script>
		
	</body>
</HTML>

